package hibernate.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NamedQueries;
import org.hibernate.annotations.NamedQuery;

@SuppressWarnings("serial")
@Entity
@Table(name = "loglar", catalog = "emmy")
@NamedQueries({
@NamedQuery(name = "findLogAygSerNo",   query = "from Loglar where aygitSeriNo = :LaygSerNo"),
@NamedQuery(name = "findLogip", 	 	query = "from Loglar where ip = :Lip"),
@NamedQuery(name = "findLogTarih", 	 	query = "from Loglar where tarih = :Ltarih"),
@NamedQuery(name = "findLogYapislem",   query = "from Loglar where yapilanislem like :Lyapilanislem"),
@NamedQuery(name = "findLogHata",   	query = "from Loglar where hata like :Lhata"),
@NamedQuery(name = "findLogCozum",   	query = "from Loglar where hata like :Lcozum")
})
public class Loglar implements java.io.Serializable {

	private Long logid;
	private Musteriaygitlari musteriaygitlari;
	private String tarih;
	private String ip;
	private String yapilanislem;
	private String hata;
	private String cozum;

	public Loglar() {
	}

	public Loglar(Musteriaygitlari musteriaygitlari, String tarih, String ip,
			String yapilanislem) {
		this.musteriaygitlari = musteriaygitlari;
		this.tarih = tarih;
		this.ip = ip;
		this.yapilanislem = yapilanislem;
	}

	public Loglar(Musteriaygitlari musteriaygitlari, String tarih, String ip,
			String yapilanislem, String hata, String cozum) {
		this.musteriaygitlari = musteriaygitlari;
		this.tarih = tarih;
		this.ip = ip;
		this.yapilanislem = yapilanislem;
		this.hata = hata;
		this.cozum = cozum;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "logid", unique = true, nullable = false)
	public Long getLogid() {
		return this.logid;
	}

	public void setLogid(Long logid) {
		this.logid = logid;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "aygitSeriNo", nullable = false)
	public Musteriaygitlari getMusteriaygitlari() {
		return this.musteriaygitlari;
	}

	public void setMusteriaygitlari(Musteriaygitlari musteriaygitlari) {
		this.musteriaygitlari = musteriaygitlari;
	}

	@Column(name = "tarih", nullable = false, length = 10)
	public String getTarih() {
		return this.tarih;
	}

	public void setTarih(String tarih) {
		this.tarih = tarih;
	}

	@Column(name = "ip", nullable = false, length = 25)
	public String getIp() {
		return this.ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	@Column(name = "yapilanislem", nullable = false, length = 16777215)
	public String getYapilanislem() {
		return this.yapilanislem;
	}

	public void setYapilanislem(String yapilanislem) {
		this.yapilanislem = yapilanislem;
	}

	@Column(name = "hata", length = 16777215)
	public String getHata() {
		return this.hata;
	}

	public void setHata(String hata) {
		this.hata = hata;
	}

	@Column(name = "cozum", length = 16777215)
	public String getCozum() {
		return this.cozum;
	}

	public void setCozum(String cozum) {
		this.cozum = cozum;
	}
}